<template>
    <div>
      <br />

      <myheader/>

     
      <div class="container">

          <div class="item_column">
              <div class="left">   
                  
              </div>

              <div class="right"> 
                <br />
                <br />

                <h1>添加奖品页面</h1>

                <van-cell-group>
                    <van-field label="奖品名称" v-model="form.name"/>
                    <van-field label="奖品价格" v-model="form.price"/>
                    <van-field label="奖品库存" v-model="form.kc"/>
                    <van-field label="奖品所需积分" v-model="form.needjf"/>

                    <van-button @click="add_prize">提交</van-button>
                </van-cell-group>
                
         
              </div>

          </div>

      </div>
      
    </div>
</template>
  
<script>
import maxios from '../http/axios'
import myheader from './myheader.vue'


  export default {
    components: {
      'myheader':myheader,
      
    },
  
    data() {
      return {
        form: {}

      }
    },

    methods: {
        add_prize(){
            maxios('/add_prize','post',this.form).then(res=>{
                if(res.code==200){
                    alert('添加成功')
                
                }else {
                    alert('添加失败')

                }
      
            })
        }
    },
    mounted() {
       
    }
  }
</script>
  
<style scoped>
@import url("../assets/style.css");

</style>